//
//  NSDate+Helper.m
//  Api
//
//  Created by CPX on 2018/9/7.
//

#import "NSDate+Helper.h"

/**
 NSDate帮助类
 */
@implementation NSDate (Helper)

- (NSString*)stringValueWithFormate:(NSString *)formate{
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    //设置格式：zzz表示时区
    //@"yyyy-MM-dd HH:mm:ss zzz"
    [dateFormatter setDateFormat:formate];
    //NSDate转NSString
    return [dateFormatter stringFromDate:self];

}

@end
